const app = require("./s_http")();
const fs = require('fs');

app.routes["/"] = function () {
    this.res.end('关爱单身狗成长协会');
};
app.routes["/demo"] = function () { 
    this.res.write(fs.readFileSync('./demo.html', 'utf-8'));
    this.res.end();
};

let server = app.listen(8080, '0.0.0.0', function () {
    console.log(`listening at http://${server.address().address}:${server.address().port}`)
})